package com.example.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.pojo.Comment;
import com.example.pojo.vo.CommentVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author crt
 */
@Mapper
public interface CommentDao extends BaseMapper<Comment> {

    List<Map<String,Integer>> fatherList(@Param("trendsId") Integer trendsId , @Param("descendant") Integer descendant );

    List<CommentVo> getFirstCommentList(@Param("trendsId") Integer trendsId);

    List<CommentVo> getSubCommentList(@Param("trendsId") Integer trendsId,@Param("commentId") Integer commentId);
}
